package com.tfw.domain;



import java.math.BigDecimal;
import java.util.Date;

/**
 * @program: fruit-sale
 * @description: 商品
 * @author: Fuwen
 * @create: 2022-07-27 21:53
 **/
public abstract class Good extends Entity{
    /**
     * 名称
     */
    private String name;
    /**
     * 单价
     */
    private BigDecimal unitPrice;
    /**
     * 重量单位
     */
    private String unit;
    /**
     * 库存
     */
    private int inventory;

    public abstract Good buy(int count);

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getInventory() {
        return inventory;
    }

    public void setInventory(int inventory) {
        this.inventory = inventory;
    }
}
